package com.yoomiito.app.ui.my.remain

import com.umeng.socialize.bean.SHARE_MEDIA
import com.yoomiito.app.base.AppConfig
import com.yoomiito.app.base.BaseActPresenter
import com.yoomiito.app.model.my.MyRemainMoneyInfo
import com.yoomiito.app.net.YmApi
import com.yoomiito.app.utils.NetworkUtils
import com.yoomiito.app.utils.wx.WXUtils
import com.yoomiito.app.utils.YMToast

import cn.droidlover.xdroidmvp.net.ApiException
import cn.droidlover.xdroidmvp.net.ApiSubscriber
import cn.droidlover.xdroidmvp.net.BaseModel
import cn.droidlover.xdroidmvp.net.XApi
import com.yoomiito.app.model.bean.OrderList
import com.yoomiito.app.model.my.ApplyBean
import com.yoomiito.app.model.my.ApplyInfo

class PendingOrderPresenter(appConfig: AppConfig) : BaseActPresenter<PendingOrderActivity>(appConfig) {

    public fun settledOrder(page:Int) {
        YmApi.getYmService()
                .settledOrder(page)
                .compose(v.bindToLifecycle())
                .compose(XApi.getApiTransformerNoData<BaseModel<OrderList>>())
                .compose(XApi.getScheduler<BaseModel<OrderList>>())
                .subscribe(object : ApiSubscriber<BaseModel<OrderList>>(handleException()) {
                    override fun onSuccess(data: BaseModel<OrderList>) {
                        v.setData(data.data)
                    }

                    override fun onFail(error: ApiException) {

                    }
                })
    }

}
